﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Bovril.PlayingCards.French
{
    public struct CardEqualityComparer : IEqualityComparer<Card>
    {
        public bool Equals(Card x, Card y)
        {
            return (x.Rank == y.Rank) && (x.Suit == y.Suit);
        }

        public int GetHashCode(Card obj)
        {
            int hashCode = ((int)obj.Rank << 6) + (int)obj.Suit;

            return hashCode;
        }
    }
}
